<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>跳转提示</title>
<link href="__STATICADMIN__layui/css/layui.css?v=2020" rel="stylesheet" type="text/css" />
<link href="__STATICADMIN__css/style.css?v=2020" rel="stylesheet" type="text/css" />
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style type="text/css">
*{ padding: 0; margin: 0; }
body{font-family: '微软雅黑'; color: #CCC; font-size: 16px;background:#f2f2f2 }
.system-message{ text-align: center; padding: 24px 48px; margin:auto; box-shadow: 0px 0px 10px rgba(0,0,0,.2)!important; top:50%; width:500px; border-radius:2px;
-moz-border-radius:10px;margin-top: 12%;/* Old Firefox */background: #fff;}
.system-message .jump{ padding-top: 10px; color: #999;text-align: center;}
.system-message .success,.system-message .error{ line-height: 1.8em;  color: #000; font-size: 18px;font-weight: bold; text-align: center;}
.system-message .detail{ font-size: 12px; line-height: 20px; margin-top: 12px; display:none}
.status-ico {width: 72px;height: 72px;line-height: 72px;font-size: 42px;color: #fff;text-align: center;border-radius: 50%;display: inline-block;margin-bottom: 24px;background-color: #52c41a!important;}
.status-error {background-color: #ff4d4f!important;}
</style>
</head>
<body>
    <div class="system-message">
        <switch name="$code">
            <case value="200">
            <div class="status-ico layui-icon layui-icon-ok"></div>
            <p class="success">{$msg|strip_tags=###}</p>
            </case>
            <default />
            <div class="status-ico status-error layui-icon layui-icon-close"></div>
            <p class="error">{$msg|strip_tags=###}</p>
            </case>
        </switch>
        <p class="jump">{:__('页面自动')} <a id="href" href="{$url}" target="_self">{:__('跳转')}</a> {:__('等待时间')}：<b id="wait">{$wait}</b>
        </p>
    </div>
</body>
<!-- 公共js部分 -->
<script src="__STATICADMIN__layui/layui.js?v2020"></script>
<script src="__STATICADMIN__js/common.js?v2020"></script>
<script type="text/javascript">
    layui.use(['jquery','layer'],function(){
        var wait = document.getElementById('wait'),
            href = document.getElementById('href').href,
            target = document.getElementById('href').target;
        var interval = setInterval(function(){
            var time = --wait.innerHTML;
            if(time <= 0) {
                if (window.top !== window.self) {
                    var index = parent.layer.getFrameIndex(window.name);
                    if (typeof index != 'undefined') {
                        parent.layer.close(index);
                        return false;
                    }
                    if ('_parent' == target) {
                        parent.location.href = href;
                    } else {
                        location.href = href;
                    }
                }
                else {
                    if ('_parent' == target) {
                        parent.location.href = href;
                    } else {
                        location.href = href;
                    }
                }
                clearInterval(interval);
            };
        }, 1000);
    })
</script>
</html>
